package cn.china.feign.controller;

import cn.china.feign.inter.MyInterface;
import entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MyController {
    @Autowired
    MyInterface mi;
    @RequestMapping(value = "/selectByPrimaryKey",produces = "application/json;charset:UTF-8")
    public Student selectByPrimaryKey(@RequestParam Integer id) {
        return mi.selectByPrimaryKey(id);
    }

    @RequestMapping(value = "/getString", produces = "application/json;charset:UTF-8")
    public String getString() {
        return mi.getString();
    }
}
